home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / OutOfPhase1.01Source / OutOfPhase Folder / AlgoSampWindow.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-01  |  4.6 KB  |  132 lines  |  [TEXT/KAHL]

  1. /* AlgoSampWindow.h */
  2.  
  3. #ifndef Included_AlgoSampWindow_h
  4. #define Included_AlgoSampWindow_h
  5.  
  6. /* AlgoSampWindow module depends on */
  7. /* MiscInfo.h */
  8. /* Audit */
  9. /* Debug */
  10. /* Definitions */
  11. /* Screen */
  12. /* EventLoop */
  13. /* Menus */
  14. /* MainWindowStuff */
  15. /* AlgoSampObject */
  16. /* TextEdit */
  17. /* IconButton */
  18. /* WindowDispatcher */
  19. /* Memory */
  20. /* Alert */
  21. /* Numbers */
  22. /* GrowIcon */
  23. /* DataMunging */
  24. /* Main */
  25. /* AlgoSampList */
  26. /* SampleConsts */
  27. /* EditImages */
  28. /* FindDialog */
  29. /* GlobalWindowMenuList */
  30.  
  31. #include "Screen.h"
  32. #include "EventLoop.h"
  33. #include "Menus.h"
  34. #include "SampleConsts.h"
  35.  
  36. struct AlgoSampWindowRec;
  37. typedef struct AlgoSampWindowRec AlgoSampWindowRec;
  38.  
  39. /* forward declarations */
  40. struct MainWindowRec;
  41. struct AlgoSampObjectRec;
  42. struct AlgoSampListRec;
  43.  
  44. /* allocate a new algorithmic sample window */
  45. AlgoSampWindowRec*    NewAlgoSampWindow(struct MainWindowRec* MainWindow,
  46.                                             struct AlgoSampObjectRec* AlgoSampObject,
  47.                                             struct AlgoSampListRec* AlgoSampList, OrdType WinX, OrdType WinY,
  48.                                             OrdType WinWidth, OrdType WinHeight);
  49.  
  50. /* write back modified data and dispose of the window */
  51. void                                DisposeAlgoSampWindow(AlgoSampWindowRec* Window);
  52.  
  53. /* return True if the data in the window has been changed since the last */
  54. /* time the file was saved. */
  55. MyBoolean                        HasAlgoSampWindowBeenModified(AlgoSampWindowRec* Window);
  56.  
  57. /* highlight the specified line number in the formula window. */
  58. void                                AlgoSampWindowHiliteLine(AlgoSampWindowRec* Window,
  59.                                             long LineNumber);
  60.  
  61. /* bring the window to the top and give it the focus */
  62. void                                AlgoSampWindowBringToTop(AlgoSampWindowRec* Window);
  63.  
  64. /* event handling routines */
  65. void                                AlgoSampWindowDoIdle(AlgoSampWindowRec* Window,
  66.                                             MyBoolean CheckCursorFlag, OrdType XLoc, OrdType YLoc,
  67.                                             ModifierFlags Modifiers);
  68. void                                AlgoSampWindowBecomeActive(AlgoSampWindowRec* Window);
  69. void                                AlgoSampWindowBecomeInactive(AlgoSampWindowRec* Window);
  70. void                                AlgoSampWindowJustResized(AlgoSampWindowRec* Window);
  71. void                                AlgoSampWindowDoMouseDown(OrdType XLoc, OrdType YLoc,
  72.                                             ModifierFlags Modifiers, AlgoSampWindowRec* Window);
  73. void                                AlgoSampWindowDoKeyDown(unsigned char KeyCode,
  74.                                             ModifierFlags Modifiers,AlgoSampWindowRec* Window);
  75. void                                AlgoSampWindowClose(AlgoSampWindowRec* Window);
  76. void                                AlgoSampWindowUpdator(AlgoSampWindowRec* Window);
  77. void                                AlgoSampWindowMenuSetup(AlgoSampWindowRec* Window);
  78. void                                AlgoSampWindowDoMenuCommand(AlgoSampWindowRec* Window,
  79.                                             MenuItemType* MenuItem);
  80.  
  81. /* get a copy of the name of the sample. */
  82. char*                                AlgoSampWindowGetNameCopy(AlgoSampWindowRec* Window);
  83.  
  84. /* get a copy of the sample's formula */
  85. char*                                AlgoSampWindowGetFormulaCopy(AlgoSampWindowRec* Window);
  86.  
  87. /* get the origin point of the sample */
  88. long                                AlgoSampWindowGetOrigin(AlgoSampWindowRec* Window);
  89.  
  90. /* get the first loop start point of the sample */
  91. long                                AlgoSampWindowGetLoopStart1(AlgoSampWindowRec* Window);
  92.  
  93. /* get the second loop start point of the sample */
  94. long                                AlgoSampWindowGetLoopStart2(AlgoSampWindowRec* Window);
  95.  
  96. /* get the third loop start point of the sample */
  97. long                                AlgoSampWindowGetLoopStart3(AlgoSampWindowRec* Window);
  98.  
  99. /* get the first loop end point of the sample */
  100. long                                AlgoSampWindowGetLoopEnd1(AlgoSampWindowRec* Window);
  101.  
  102. /* get the second loop end point of the sample */
  103. long                                AlgoSampWindowGetLoopEnd2(AlgoSampWindowRec* Window);
  104.  
  105. /* get the third loop end point of the sample */
  106. long                                AlgoSampWindowGetLoopEnd3(AlgoSampWindowRec* Window);
  107.  
  108. /* get the sampling rate */
  109. long                                AlgoSampWindowGetSamplingRate(AlgoSampWindowRec* Window);
  110.  
  111. /* get the natural pitch for playback conversion */
  112. double                            AlgoSampWindowGetNaturalFrequency(AlgoSampWindowRec* Window);
  113.  
  114. /* get the number of bits that the sample uses */
  115. NumBitsType                    AlgoSampWindowGetNumBits(AlgoSampWindowRec* Window);
  116.  
  117. /* get the number of channels that the sample uses */
  118. NumChannelsType            AlgoSampWindowGetNumChannels(AlgoSampWindowRec* Window);
  119.  
  120. /* the name of the document has changed, so change the title bar.  the caller is */
  121. /* responsible for disposing of the string, which must be non-null-terminated */
  122. void                                AlgoSampWindowGlobalNameChange(AlgoSampWindowRec* Window,
  123.                                             char* NewFilename);
  124.  
  125. /* update the name in the title bar even if the document name hasn't changed. */
  126. void                                AlgoSampWindowResetTitlebar(AlgoSampWindowRec* Window);
  127.  
  128. /* write back all modified data to the algosamp object */
  129. MyBoolean                        AlgoSampWindowWritebackModifiedData(AlgoSampWindowRec* Window);
  130.  
  131. #endif
  132.